<include file="App/Home/View/Public/header.html"/>
<style>
.ui-btn-inline {
	width: 87%;
	margin-top: 2em;
	background-color: rgba(255,255,255,0) !important;
	text-shadow: none;
	border: none;
	box-shadow: none;
	background-color: #ffc703 !important;
	color: #333 !important;
	text-shadow: none !important;
}
.ui-shadow-inset {
	background-color: rgba(255,255,255,0) !important;
	text-shadow: none;
	border: 1px solid #ffc703 !important;
	box-shadow: none;
	background-color: rgba(0,0,0,0.5) !important;
}
</style>
<!-----------------------------主体内容 开始------------------------------>
<div data-role="main" class="ui-content"> 
  <!------登录表单 开始------->
  <form class="w80p btc_tcoin" method="post" action="" onsubmit="return false">
    <div class="ui-field-contain padt_5">
      <label for="idnumber" class="ui-hidden-accessible">{$Think.lang.__QINGSHURUDUIFANGID__}</label>
      <input type="text" name="phone" onchange="ajaxGetName();" id="phone"   placeholder="{$Think.lang.__QINGSHURUDUIFANGID__}" />
    </div>
    <div class="ui-field-contain padt_5">
      <label for="realname1" class="ui-hidden-accessible">{$Think.lang.__XINGMINGXITONGZIDONGXIANSHI__}</label>
      <input type="text" id="realname1" name="realname1" id="realname1"  disabled="disabled"  placeholder="{$Think.lang.__XINGMINGXITONGZIDONGXIANSHI__}" />
    </div>
    <div class="ui-field-contain padt_5">
      <label for="lkumber" class="ui-hidden-accessible">{$Think.lang.__QINGSHURULUNKASHULIANG__}</label>
      <input type="number" name="lkumber" id="lkumber"   placeholder="{$Think.lang.__QINGSHURULUNKASHULIANG__}" />
    </div>
    <div class="ui-field-contain padt_5">
      <label for="password2" class="ui-hidden-accessible">{$Think.lang.__QINGSHURUJIAOYIMIMA__}</label>
      <input type="password" name="password2" id="password2" required placeholder="{$Think.lang.__QINGSHURUJIAOYIMIMA__}">
    </div>
    <input class="w100p" type="submit" onclick="ajaxTransfer();" data-inline="true" value="{$Think.lang.__QUEDING__}">
  </form>
  <!------登录表单 结束-------> 
  <!------转入转出记录链接 开始------>
  <p>
  <div class="w80p"> <a class="float_l coin_jl" href="{:U('Transfer/income')}">{$Think.lang.__ZUANRUJILU__}</a> <a class="float_r coin_jl" href="{:U('Transfer/out')}">{$Think.lang.__ZUANCHUJILU__}</a> </div>
  <div class="clear"></div>
  </p>
  <!------转入转出记录链接 结束------> 
</div>
<!-----------------------------主体内容 结束------------------------------> 
<script type="text/javascript">
	function ajaxGetName(){
		var phone = $('#phone').val();
		
		
		$.ajax({
			url:"{:U('Transfer/getNameByPhone')}",
			type:"POST",
			data:{'phone':phone},
			dataType:"JSON",
			success:function (data){
				
				$("#realname1").val(data.info);
				
			}
		})
	}
	function ajaxTransfer(){
		var phone = $("#phone").val();
		var num = $("#lkumber").val();
		var tradepwd = $("#password2").val();
		if(phone == ""){
			layer.msg("{$Think.lang.__QINGSHURULUNKASHULIANG__}");
			$("#phone").focus();return false;
		}
		//正则验证手机号码
		
		if(tradepwd == ""){
			layer.msg("{$Think.lang.__QINGSHURUJIAOYIMIMA__}");
			$("#password2").focus();return false;
		}
		parseInt(num);
		if(num <= 0){
			layer.msg("{$Think.lang.__QINGSHURUZHENGQUELUNKASHULIANG__}");
			$("#lkumber").focus();return false;
		}
		$.ajax({
			url:"{:U('Transfer/transfer')}",
			type:"POST",
			data:{'phone':phone,'num':num,'tradepwd':tradepwd},
			dataType:"JSON",
			success:function (data){
				layer.msg(data.info);
				if(data.status == 1){
					location.replace(location);
				}
			}
		})
		
	
	}
</script> 
<include file="App/Home/View/Public/footer.html"/>